package com.xykj.common.response;

public class Response {
    private Integer code;
    private String message;
    private Object data;

    public Response() {
    }

    public Response(Integer code, String message, Object data) {
        this.code = code;
        this.message = message;
        this.data = data;
    }

    public static Response success(String message, Object data){
        return new Response(0,message,data);
    }
    public static Response error(String message){
        return new Response(1,message,null);
    }

    public Integer getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }

    public Object getData() {
        return data;
    }
}
